<include file="Public/head" />
<script language="javascript" type="text/javascript" src="__PUBLIC__/My97DatePicker/WdatePicker.js"></script>

<body>
  <form action="" id="listform">
    <div class="panel admin-panel">
      <div class="panel-head"><strong class="icon-reorder"> {:L("huiyuanliebiao")}</strong></div>
      <div class="padding border-bottom">
        <ul class="search" style="padding-left:10px;">
          <li>{:L("sousuo")}：</li>
          <li><input class="input" type="text" name="nickname" value="{$nickname}" placeholder="{:L('qingshuru')}{:L('yonghuming')}"></li>
          <li><input class="input" type="text" name="tel" value="{$tel}" placeholder="{:L('qingshuru')}{:L('lianxishouji')}"></li>
          <li>{:L("shijianfanwei")}：</li><li><input class="Wdate input" type="text" name="start_time" value="{$start_time}" onClick="WdatePicker()" /></li>
          <li>~</li>
          <li><input class="Wdate input" type="text" name="end_time" value="{$end_time}" onClick="WdatePicker()" /></li>
          <li><input type="submit" value="{:L('sousuo')}" class="button border-main icon-search"/></li>
        </ul>
      </div>
      <table class="table table-hover text-center">
        <tr>
          <th width="100">ID</th>
          <th width="10%">{:L("yonghutouxiang")}</th>
          <th>{:L("yonghuming")}（{:L("xingming")}）</th>
          <th>{:L("lianxishouji")}</th>
          <!--<th>{:L("huiyuanjibie")} / {:L("tuijianren")}</th>-->
          <th>{:L("zhuceshijian")}</th>
          <th width="310">{:L("caozuo")}</th>
        </tr>
        <foreach name="list" item="v">
          <tr class="tr{$v['user_id']}">
            <td>{$v['user_id']}</td>
            <td><img src="{$v['avatar_url']}" width="50px"></td>
            <td>{$v['nick_name']|default="--"}（{$v['full_name']|default="--"}）</td>
            <td>{$v['mobile']|default="--"}</td>
            <!--<td><if condition="$v['power'] eq 0">{:L("putonghuiyuan")}<elseif condition="$v['power'] eq 1" /><font color="#f00">{:L("gaojihuiyuan")}</font></if> / {$v['tuijian']|default="&#45;&#45;"}</td>-->
            <td>{$v['register_time']|date="Y-m-d H:i:d",###}</td>
            <td>
              <div class="button-group">
                <a class="button border-main" href="{:U('Member/edit',array('id'=>$v['user_id']))}"><span class="icon-edit"></span> {:L("bianji")}</a>
                <a class="button border-red" href="javascript:void(0)" onclick="return del({$v['user_id']})"><span class="icon-trash-o"></span> {:L("shanchu")}</a>
              </div>
            </td>
          </tr>
        </foreach>
        <tr>
          <td colspan="10"><div class="pagelist">{$page}</div></td>
        </tr>
      </table>
    </div>
  </form>
  <script type="text/javascript">
    function del(id){
      if(confirm("{:L('shanchuxiaoxi')}")){
        var url = "{:U('Member/delete')}";
        $.getJSON(url,{id:id},function (data){
          if(data.result == 'yes'){$(".tr"+id).remove();}
          else if(data.result == 'no'){alert('ERROR.');}
        })
      }
    }
  </script>
</body>

</html>